Many flatbed scanners use a rack and pinion gear system to move an optical carriage along a scan bed when scanning. The rack typically extends along the scanning bed and the pinion gear is attached to the carriage. Most of these flatbed scanners can be equipped with an automatic document feeder (ADF). When the scanner is using the ADF for a scan the pinion gear may be moved off of the rack thereby disengaging the pinion gear from the teeth on the rack. This allows the same drive system to be used for driving the carriage in a flatbed scan and driving the ADF in an ADF scan. Once the ADF scan is completed, the pinion gear on the carriage needs to be re-meshed with the teeth on the rack.